<div class="col-mb-12 col-offset-1 col-3 kit-hidden-tb" id="secondary" role="complementary">

    <?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>

    <section class="widget">

		<h3 class="widget-title"><?php _e('最新文章'); ?></h3>

        <ul class="widget-list">

            <?php $this->widget('Widget_Contents_Post_Recent')

            ->parse('<li><a href="{permalink}" title="查看《{title}》的全文">{title}</a></li>'); ?>
        </ul>

    </section>

    <?php endif; ?>



    <?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentComments', $this->options->sidebarBlock)): ?>

    <section class="widget">

		<h3 class="widget-title"><?php _e('最近回复'); ?></h3>

        <ul class="widget-list">

        <?php $this->widget('Widget_Comments_Recent')->to($comments); ?>

        <?php while($comments->next()): ?>

            <li><a href="<?php $comments->permalink(); ?>"><?php $comments->author(false); ?></a>：<?php $comments->excerpt(35, '...'); ?></li>

        <?php endwhile; ?>

        </ul>

    </section>

    <?php endif; ?>



    <?php if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)): ?>

    <section class="widget">

		<h3 class="widget-title"><?php _e('分类'); ?></h3>

        <ul class="widget-list">

            <?php $this->widget('Widget_Metas_Category_List')

            ->parse('<li><a href="{permalink}">{name}</a> ({count})</li>'); ?>

        </ul>

	</section>

    <?php endif; ?>

    <section class="widget">
        <h3 class="widget-title">标签云</h3>
        <div id="myCanvasContainer">
            <canvas width="220" height="200" id="myCanvas" style="margin:auto;">
                <p>Anything in here will be replaced on browsers that support the canvas element</p>
            </canvas>
        </div>
        <?php $this->widget('Widget_Metas_Tag_Cloud')->to($tags); ?>
        <ul class="tags-list" id="tags">
        <?php while($tags->next()): ?>
            <li><a rel="tag" href="<?php $tags->permalink(); ?>" title='<?php $tags->name(); ?>'><?php $tags->name(); ?>(<?php $tags->count(); ?>)</a></li>
        <?php endwhile; ?>
        </ul>
    </section>

    <section class="widget">

    <h3 class="widget-title">友邻Links</h3>

    <ul class="widget-list">

        <?php Links_Plugin::output(); ?>

    </ul>

    </section >



<section class="widget">

<h3 class="widget-title">My Blog</h3>

<ul class="widget-list">

    <li>文章总数：<?php $this->widget('Widget_Stat')->publishedPostsNum(); ?> 篇</li>

    <li>标签总数：<?php $this->widget('Widget_Metas_Tag_Cloud')->length() ; ?> 条</li>

    <li>评论总数：<?php $this->widget('Widget_Stat')->publishedCommentsNum() ; ?> 条</li>

    <li>建站时间：2014年7月28日</li>

    <li>最后更新：<?php $this->widget('Widget_Contents_Post_Recent')->to($post)->next(); $post->date('Y年n月d日'); ?></li>

    <li>运行天数：<?php date_default_timezone_set('Asia/Shanghai'); echo(ceil((time() - strtotime('2014-07-28'))/86400))?> 天</li>

</ul>

</section >


    <!--<?php if (!empty($this->options->sidebarBlock) && in_array('ShowArchive', $this->options->sidebarBlock)): ?>

    <section class="widget">

		<h3 class="widget-title"><?php _e('归档'); ?></h3>

        <ul class="widget-list">

            <?php $this->widget('Widget_Contents_Post_Date', 'type=month&format=Y-m')

            ->parse('<li><a href="{permalink}">{date}</a></li>'); ?>

        </ul>

	</section>

    <?php endif; ?>-->



    <?php if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)): ?>

	<section class="widget">

		<h3 class="widget-title"><?php _e('其它'); ?></h3>

        <ul class="widget-list">

            <?php if($this->user->hasLogin()): ?>

				<li class="last"><a href="<?php $this->options->adminUrl(); ?>"><?php _e('进入后台'); ?> (<?php $this->user->screenName(); ?>)</a></li>

                <li><a href="<?php $this->options->logoutUrl(); ?>"><?php _e('退出'); ?></a></li>

            <?php else: ?>

                <li class="last"><a href="<?php $this->options->adminUrl('login.php'); ?>"><?php _e('登录'); ?></a></li>

            <?php endif; ?>

            <li><a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a></li>

            <li><a href="<?php $this->options->commentsFeedUrl(); ?>"><?php _e('评论 RSS'); ?></a></li>

            <li><a href="http://www.typecho.org">Typecho</a></li>

        </ul>

	</section>

    <?php endif; ?>



</div><!-- end #sidebar -->